<template>
<div style="text-align: center;">
@{{Time}} PoweredBy {{SiteName}}
</div>
</template>

<script>

import {commonApi} from "@/api/commonApi";
import {globalValue} from "@/config/globalconfig";

export default {
  name: "globelFooter",
  data(){
    return{
      Time:null,
      SiteName:null
    }
  },
  mounted() {
    var fullYear = new Date().getFullYear();
    this.axios.get(commonApi.getValueofAttribute+"publishTime")
        .then(res=>{
          if (!res.data.code&&res.data.data == fullYear){
            this.Time=res.data.data
          }
          else {
            this.Time=fullYear.toString()
          }
        })
        .catch(()=>{
          this.Time=fullYear.toString()
        })
    this.axios.get(commonApi.getValueofAttribute+"siteName")
        .then(res=>{
          if (!res.data.code){
            this.SiteName=res.data.data
          }
          else {

            this.SiteName=globalValue.protectTitle()
          }
        })
        .catch(()=>{
          this.SiteName=globalValue.protectTitle()
        })
  }
}
</script>

<style scoped>

</style>